package cn.yitun.chat.yitunservermanagecore.general.manage.core.service.impl;

import cn.yitun.chat.yitunservercommonlib.dataentity.dto.login.OnlineUserDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.system.user.UserDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.login.OnlineUserVo;
import cn.yitun.chat.yitunserverimbase.dao.login.UserJwtDao;
import cn.yitun.chat.yitunserverimbase.dao.system.UserDao;
import cn.yitun.chat.yitunservermanagecore.general.manage.core.service.OnlineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 待完善
 *
 * @author yitun
 */
@Service
public class OnlineServiceImpl implements OnlineService {

    @Autowired
    private UserJwtDao userJwtDao;

    @Autowired
    private UserDao userDao;

    @Override
    public List<OnlineUserVo> list(OnlineUserDto userDto) {
        return userJwtDao.list(userDto);
    }

    @Override
    public List<UserDto> listOnlineUser() {
        return null;
    }

    /**
     * 定时更新用户登录状态
     * @return
     */
    @Override
    public void checkLoginStatus() {
        userJwtDao.checkLoginStatus();
    }
}
